package com.liuhe.zone;

import java.time.ZoneId;
import java.util.Set;

public class Demo1 {
    public static void main(String[] args) {
        //获取所有时区的集合
        Set<String> availableZoneIds = ZoneId.getAvailableZoneIds();
        System.out.println(availableZoneIds);
        //获取当前默认时区
        ZoneId zoneId = ZoneId.systemDefault();
        System.out.println(zoneId);
        //获取制定时区
        ZoneId zoneId1 = zoneId.of("Asia/Chongqing");
        System.out.println(zoneId1);
    }
}
